<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    #d1{
      width: 1000px;
      height: 100px;
      background-color: red;
      position: fixed;/*固定定位*/
    }
    #d2{
      width: 50px;
      height:200px ;
      background-color: blue;
      position: fixed;
      /*固定定位 通过left/right/top/bottom 相对于窗口做偏移*/
      top: 20px;
      right: 10px;
    }
  </style>
</head>
<body>
<div id="d1"></div>
<div id="d2"></div>
<img src="../作业.png" alt="">
<img src="../作业.png" alt="">
<img src="../作业.png" alt="">
<img src="../作业.png" alt="">
<img src="../作业.png" alt="">
<img src="../作业.png" alt="">

</body>
</html>